/*
 * IpcTranceiverFactory.hpp
 *
 *  Created on: Nov 2, 2013
 *      Author: vladimir
 */

#ifndef IPCTRANCEIVERFACTORY_HPP_
#define IPCTRANCEIVERFACTORY_HPP_

#include <string>
#include <memory>
#include <functional>

namespace vjipc
{

struct IpcTranceiverIface;

class IpcTranceiverFactory
{
public:

	typedef std::unique_ptr< IpcTranceiverIface > IpcTranceiverPtr;
	typedef std::function< IpcTranceiverPtr ( const std::string & name ) > CreatorFn;


	static IpcTranceiverPtr Create( const std::string & name );

	static void ResetCreator();
	static void SetCreator( CreatorFn newCreator );

private:
	IpcTranceiverFactory();
};

} /* namespace vjipc */

#endif /* IPCTRANCEIVERFACTORY_HPP_ */
